import { onMounted,reactive,toRefs } from 'vue'

export const userPosition=()=>{
  const position=reactive({x:0,y:0})
  onMounted(()=>{
    window.addEventListener('click',e=>{
      position.x=e.pageX
      position.y=e.pageY
    })
  })
  return toRefs(position)
}